<template>
  <div class="home">
    <navigation></navigation>
    <go-top></go-top>
    <comment-icon></comment-icon>
    <swipes :swipesImg="swipesImg"></swipes>
    <selected :boutiqueList="boutiqueList"></selected>
    <newest :newList="newList"></newest>
    <new-bottom :newList="newList" :rankingLIst="rankingLIst"></new-bottom>
    <bottom></bottom>
  </div>
</template>

<script>
import {
  firstPageLun,
  firstPageJing,
  firstPageHot,
  firstPageHotRanking,
} from "../../network/home";

import Bottom from "../../components/bottom/bottom";
import GoTop from "../../components/gotop/goTop";
import Navigation from "../../components/navigation/navigation";
import NewBottom from "./homeComp/newBottom";
import Newest from "./homeComp/newest";
import Selected from "./homeComp/selected";
import CommentIcon from "../../components/commenticon/commentIcon";
import Swipes from "../../components/swipe/swipes.vue";
export default {
  name: "Home",
  components: {
    Navigation,
    Selected,
    Newest,
    NewBottom,
    Bottom,
    GoTop,
    CommentIcon,
    Swipes,
  },
  data() {
    return {
      swipesImg: [],
      boutiqueList: [],
      newList: [],
      rankingLIst: [],
    };
  },
  created() {
    this.getList();
  },
  methods: {
    getList() {
      firstPageLun().then((res) => {
        this.swipesImg = res.data.data;
      });
      firstPageJing().then((res) => {
        this.boutiqueList = res.data.data;
      });

      firstPageHot().then((res) => {
        this.newList = res.data.data;
        console.log(res);
      });

      firstPageHotRanking().then((res) => {
        this.rankingLIst = res.data.data;
      });
    },
  },
};
</script>

<style>
.home {
  overflow: hidden;
}
</style>
